package com.depthsdata.coe.service;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-12-27 11:41:50
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class BusinessUnitBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.depthsdata.coe.dao.BusinessUnit businessUnit;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(businessUnit);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.depthsdata.coe.dao.IBusinessUnitDAO.Id);
		
																										
				
																
		mappedDaoFields.put("businessUnitName",com.depthsdata.coe.dao.IBusinessUnitDAO.BusinessUnitName);
		
																						
				
																				
		mappedDaoFields.put("businessUnitIcon",com.depthsdata.coe.dao.IBusinessUnitDAO.BusinessUnitIcon);
		
																		
				
																								
		mappedDaoFields.put("deleteFlag",com.depthsdata.coe.dao.IBusinessUnitDAO.DeleteFlag);
		
														
				
																												
		mappedDaoFields.put("status",com.depthsdata.coe.dao.IBusinessUnitDAO.Status);
		
										
				
																																
		mappedDaoFields.put("remarks",com.depthsdata.coe.dao.IBusinessUnitDAO.Remarks);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public BusinessUnitBean() {
		super();
	    		
		this.businessUnit = new com.depthsdata.coe.dao.BusinessUnit();
                
	}
	
		
	public BusinessUnitBean(com.depthsdata.coe.dao.BusinessUnit businessUnit) {
		super();
	
		this.businessUnit = businessUnit;
		
	}
		
		
		
    	
	public com.depthsdata.coe.dao.BusinessUnit convertToBusinessUnit(){
		return this.businessUnit;
	}
	
	public com.depthsdata.coe.dao.BusinessUnit convertTo(){
		return this.businessUnit;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.businessUnit.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.businessUnit.setId(id);
	}
		
													
		
		
					
			
		
	/**
	 * Get businessUnitName
	 * 
	 * @return String
	 */
	public String getBusinessUnitName(){
		return (String) this.businessUnit.getBusinessUnitName();
	}
	
	/**
	 * Set businessUnitName
	 * 
	 * @parameter String
	 */
	public void setBusinessUnitName(String businessUnitName){
		
		this.businessUnit.setBusinessUnitName(businessUnitName);
	}
		
											
		
		
							
			
		
	/**
	 * Get businessUnitIcon
	 * 
	 * @return String
	 */
	public String getBusinessUnitIcon(){
		return (String) this.businessUnit.getBusinessUnitIcon();
	}
	
	/**
	 * Set businessUnitIcon
	 * 
	 * @parameter String
	 */
	public void setBusinessUnitIcon(String businessUnitIcon){
		
		this.businessUnit.setBusinessUnitIcon(businessUnitIcon);
	}
		
									
		
		
									
			
		
	/**
	 * Get deleteFlag
	 * 
	 * @return long
	 */
	public long getDeleteFlag(){
		return (long) this.businessUnit.getDeleteFlag();
	}
	
	/**
	 * Set deleteFlag
	 * 
	 * @parameter long
	 */
	public void setDeleteFlag(long deleteFlag){
		
		this.businessUnit.setDeleteFlag(deleteFlag);
	}
		
							
		
		
											
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.businessUnit.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.businessUnit.setStatus(status);
	}
		
					
		
		
													
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.businessUnit.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.businessUnit.setRemarks(remarks);
	}
		
			
		
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof BusinessUnitBean) == false) {
            return false;
        } // end if

        BusinessUnitBean other = (BusinessUnitBean) obj;
        
        boolean isEqual = false;
        
                
        com.depthsdata.coe.dao.BusinessUnit tempBusinessUnit = other.convertToBusinessUnit();
        
        if(tempBusinessUnit == null || this.businessUnit == null){
        	isEqual = false;
        }
        else if(tempBusinessUnit == this.businessUnit || tempBusinessUnit.equals(this.businessUnit) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static BusinessUnitBean[] toArray(com.depthsdata.coe.dao.BusinessUnit[] aBusinessUnits){
		
		return toArray(aBusinessUnits,null);
	}
	
	public static BusinessUnitBean[] toArray(com.depthsdata.coe.dao.BusinessUnit[] aBusinessUnits , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aBusinessUnits)){
		 	return new BusinessUnitBean[0];
		 }
		 
		 int length = aBusinessUnits.length;
		 
		 BusinessUnitBean[] beans = new BusinessUnitBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new BusinessUnitBean(aBusinessUnits[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aBusinessUnits[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}